home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / dvivga9.zip / DVIHEAD.H < prev    next >
Text File  |  1988-05-30  |  17KB  |  360 lines

  1. /* -*-C-*- dvihead.h */
  2. /*-->dvihead*/
  3. /**********************************************************************/
  4. /****************************** dvihead *******************************/
  5. /**********************************************************************/
  6.  
  7. /**********************************************************************/
  8. /*************************  Revision History  *************************/
  9. /**********************************************************************/
  10.  
  11. /***********************************************************************
  12. [Begin Revision History]
  13.  
  14. <BEEBE.TEX.DVI.NEW>DVIHEAD.H.2, 24-Jun-86 18:11:55, Edit by BEEBE
  15. Added saving of all ten TeX  page counters in prtpage() in global  array
  16. tex_counter[], and  function tctos()  to convert  them to  a string  for
  17. printing.  All warning and error messages are now accompanied by a  list
  18. of the non-zero page counters to  help relate errors to output  document
  19. pages.
  20.  
  21. <BEEBE.TEX.DVI>DVIHEADER.H.21, 13-Mar-86 10:43:33, Edit by BEEBE
  22. Added use of  getenv() for  Unix and PC-DOS  to pick  up definitions  of
  23. texinputs and texfonts at runtime; if these are available, they override
  24. built-in choices.   This makes  it  possible to  move compiled  code  to
  25. similar machines with different  directory structures without having  to
  26. recompile.  For TOPS-20, this is unnecessary, since the defaults already
  27. point to these, and a name of the form /texinputs/foo.bar is  translated
  28. by PCC-20 to texinputs:foo.bar, from which the current definition of the
  29. logical name "texinputs:" is used to find the desired directory.  It can
  30. even be a  chain of directories;  in Unix  and PC-DOS, we  will need  to
  31. introduce  a  special  version  of  fopen()  to  handle  filenames  with
  32. environment variable prefixes which might represent directory chains.
  33.  
  34. Removed variable-length  argument lists  to  fatal() and  warning()  for
  35. portability.  Changed all preprocessor  #ifdef's and #ifndef's to  #if's
  36. for  portability;  all  symbols  for  devices,  operating  systems,  and
  37. implementations are now explicitly defined to be 0 or 1.  IBM PC Lattice
  38. C will not accept the operators  "!", "||", or "&&" in #if  expressions,
  39. although they should be perfectly legal; rearranged several  expressions
  40. to avoid these (introduce #else, use "|" and "&").
  41.  
  42. Added procedures fontfile() and fontsub() to encapsulate construction of
  43. system-dependent font file names  and provide for user-specifiable  font
  44. substitutions  for   unavailable   font  files   (new   runtime   option
  45. -ffontfile).
  46.  
  47. Removed old #ifdef FOOBAR ... #endif code sections in several procedures
  48. which were  completely obsolete.   Added header  comment line  to  every
  49. file; it  contains  the  EMACS  "-*-C-*-"  mode  string  and  the  exact
  50. (case-sensive) filename,  since many  functions have  been defined  with
  51. names  in  mixed  case  for  readability  (probably  should  have   used
  52. underscore instead, but none do), and on Unix, the letter case matters.
  53.  
  54. Replaced index()  and  rindex(),  which have  different  definitions  in
  55. different C  implementations, by  4.2BSD (and  coming ANSI  C  standard)
  56. functions strchr() and strrchr(), for which .h files are provided.
  57.  
  58.  
  59. <BEEBE.TEX.DVI>DVIHEADER.H.11,  8-Jan-86 16:55:59, Edit by BEEBE
  60. Added DVITYPE  Version 2.6  MAXDRIFT  correction to  pixel  coordinates.
  61. This  adds  function  fixpos()   called  from  movedown(),   moveover(),
  62. setchar(), and setrule(), and #include'd  in DVI*.c with definitions  in
  63. gblprocs.h and machdefs.h.  Revision level incremented by 0.01 (most are
  64. now at 2.01)
  65.  
  66.  
  67. <BEEBE.TEX.DVI>DVIHEADER.H.7, 22-Jul-85 12:51:02, Edit by BEEBE
  68. Added PostScript driver for Apple LaserWriter.
  69.  
  70. Added support for multiple input DVI  files to each of which all  switch
  71. options apply.
  72.  
  73.  
  74. <BEEBE.TEX>DVIJET.C.70, 30-May-85 00:33:51, Edit by BEEBE
  75. Revised "int" type  declarations to signed  types (INT8, INT16,  INT32),
  76. unsigned  types  (BYTE,   UNSIGN16,  UNSIGN32),   and  coordinate   type
  77. (COORDINATE) as  a  prelude  to moving  to  microprocessors  where  long
  78. integers impose a serious runtime penalty.
  79.  
  80. Type casts added to many assignments and arguments.
  81.  
  82. "double" changed to "float".
  83.  
  84. Added a few more "register" declarations and deleted unused variables.
  85.  
  86. Device-dependent code  sections identified  as prelude  to code  sharing
  87. between device  drivers via  "#include"  statements for  each  shareable
  88. procedure.
  89.  
  90. Added -c, -o, -r, -x, -y options and inch() procedure.
  91.  
  92. Several passes with "lint" under VAX Unix to detect further problems
  93.  
  94.  
  95. <BEEBE.TEX>DVIJET.C.18, 27-May-85 23:44:34, Edit by BEEBE
  96. Revise copy of Printronix driver for output on Hewlett-Packard Laser Jet
  97.  
  98.  
  99. <BEEBE.TEX>DVIPRX.C.125, 20-Oct-84 14:02:27, Edit by BEEBE
  100. Add mag_table[] and rewrite actfact() to use it.  Add code to readfont()
  101. and openfont()  to  choose  nearest available  font  magnification  when
  102. required one is  unavailable.  Enable  USEGLOBALMAG since  code now  can
  103. handle it properly.  Allow upper-case  option letters as equivalents  of
  104. lower-case ones -- non-Unix folks abhor such distinctions.
  105.  
  106.  
  107. <BEEBE.TEX>DVIPRX.C.118, 30-Sep-84 14:42:10, Edit by BEEBE
  108. Change = to  == in "if  (...)" in procedure  warning, change g_dolog  to
  109. BOOLEAN.
  110.  
  111.  
  112. [End Revision History]
  113. ***********************************************************************/
  114.  
  115. /**********************************************************************/
  116. /************************  Development History  ***********************/
  117. /**********************************************************************/
  118.  
  119. /***********************************************************************
  120. **
  121. **  The code is arranged  to allow easy modification  of the output  for
  122. **  display on other dot matrix printers, and for porting to a new  host
  123. **  computing environment.  The  sections labelled "Device  Definitions"
  124. **  and "Global Definitions"  below definitely  need to  be modified  in
  125. **  such a case.  A couple of the  40 or so procedures in the  '#include
  126. **  "xxx.h"' section may need to be adjusted as well, but almost all the
  127. **  rest should be both host- and output-device-independent.
  128. **
  129. **  The runtime switches will be similar for most devices, but some will
  130. **  require additional ones.  Device-name conditionals should be used to
  131. **  bracket these, so that code  can be lifted without modification  for
  132. **  use in a new dvi driver.
  133. **
  134. **  Instead of building up a bit map corresponding to the final  printer
  135. **  file, we keep a  large array which  has a one-to-one  correspondence
  136. **  with the printed page; dots in  a horizontal raster on the page  are
  137. **  consecutive in memory.   This allows  us to OR  in character  raster
  138. **  patterns without having to unpack every single bit.  At  end-of-page
  139. **  time, each  raster  row  is  trimmed of  trailing  white  space  and
  140. **  formatted into a line of data to  be sent to the printer file.   For
  141. **  those devices which  pack dots for  6, 7,  or 8 rows  into a  single
  142. **  character, some merging of raster lines will be necessary.
  143. **
  144. **  To use the program, type:
  145. **
  146. **  dvixxx {-b} {-c#} {-d#} {-ffontsubfile} {-l} {-m#} {-o#:#} {-o#} {-p}
  147. **       {-r#} {-v} {-x#units} {-y#units} dvifile(s)
  148. **
  149. **  The order of command options and DVI file names is not  significant;
  150. **  all switch values apply to all  DVI files.  DVI files are  processed
  151. **  in order from left to right.   The command options are (letter  case
  152. **  is IGNORED):
  153. **
  154. **    b    Backwards order printing from the default.  For example,
  155. **        laser printers using the Canon engine print normally
  156. **        receive pages in reverse order because they stack printed
  157. **        side up.  Some have page handling mechanisms that stack
  158. **        them face down, and in such a case -b will ensure that
  159. **        they come out in order 1,2,... instead of n,n-1,n-2,...
  160. **
  161. **    c#    Print # copies of each output page.
  162. **
  163. **    d#    Debug output to stderr if non-zero value given.
  164. **
  165. **    ffontsubfile    Define an alternate font substitution file which
  166. **        is to be used instead of the default ones (see below).
  167. **
  168. **    l    Inhibit logging.
  169. **
  170. *